package c1705;

import java.util.Scanner;

public class D {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int n = cin.nextInt();
        if (n == 1) {
            for (int i = 1; i <= 9; ++i) {
                System.out.println(i);
            }
        } else {
            int l = 1, r = 10, tmp = n / 2;
            while (--tmp > 0) {
                l *= 10;
                r *= 10;
            }
            if (n % 2 == 0)
                for (int i = l; i < r; i++) {
                    String strL = String.valueOf(i);
                    System.out.print(strL);
                    System.out.println(new StringBuffer(strL).reverse().toString());
                }
            else {
                for (int i = l; i < r; i++) {
                    String strL = String.valueOf(i);
                    String strR = new StringBuffer(strL).reverse().toString();
                    for (int j = 0; j < 10; j++) {
                        System.out.println(strL + j + strR);
                    }
                }
            }
        }
        cin.close();
    }
}